<template>
<div>
<WebRTC></WebRTC>
</div>
</template>

<script>
import WebRTC from "./webRTC";
export default {
  components: {
    WebRTC
  },
  data() {
    return {
    };
  },

  computed: {},
  created() {

  },
  mounted() {
    // navigator.mediaDevices.getUserMedia({audio: true })
    // .then((stream)=>{
    //   console.log("获取到摄像头权限");
    //   console.log(stream,"111111111111111111111111111111111111111111111111111111111111");

    //     const audioElement = document.getElementById('remoteAudio'+this.deviceId);
    //     console.log(stream.getAudioTracks());
    //     console.log(audioElement);
        
    //     // audioElement.srcObject = stream.getAudioTracks()[0];
    //     audioElement.srcObject = stream;
    //     audioElement.play();

    // })
    // .catch(function(error) {
    //     console.error("Error accessing media devices.", error);
    // });

  },
  methods: {

  },
  
};
</script>

<style lang="scss" scoped>
</style>
